using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TopographicProductionTools._DataManagement._Geodatabase
{
    /// <summary>
    /// <para>Geodatabase To Shape</para>
    /// <para>Exports one or more feature classes in a geodatabase to shapefiles using one of three modes: defense, generic, and Multinational Geospatial Co-Production Program
    /// (MGCP).</para>
    /// <para>使用以下三种模式之一将地理数据库中的一个或多个要素类导出为 shapefile：防御模式、通用模式和多国地理空间协同生产计划
    /// （MGCP）。</para>
    /// </summary>    
    [DisplayName("Geodatabase To Shape")]
    public class GeodatabaseToShape : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GeodatabaseToShape()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features used to create the shapefiles.</para>
        /// <para>用于创建 shapefile 的功能。</para>
        /// </param>
        /// <param name="_output_folder">
        /// <para>Output Folder</para>
        /// <para>The folder that will contain the output shapefiles.</para>
        /// <para>将包含输出 shapefile 的文件夹。</para>
        /// </param>
        /// <param name="_coded_value_domain_export_mode">
        /// <para>Coded Value Domain Export Mode</para>
        /// <para><xdoc>
        ///   <para>Indicates what method will be used to export coded domain values.</para>
        ///   <bulletList>
        ///     <bullet_item>Descriptions—Coded domain values will be exported using their descriptions rather than raw values.</bullet_item><para/>
        ///     <bullet_item>Values—Coded domain values will be exported as raw values. This is the default.</bullet_item><para/>
        ///     <bullet_item>Values and descriptions—Coded domain values will be exported as raw values and string descriptions</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示将用于导出编码域值的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>描述 - 编码属性域值将使用其描述（而不是原始值）导出。</bullet_item><para/>
        ///     <bullet_item>值—编码的属性域值将导出为原始值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>值和描述 - 编码的属性域值将导出为原始值和字符串描述</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_conversion_method">
        /// <para>Conversion Method</para>
        /// <para><xdoc>
        ///   <para>Indicates which conversion method will be applied.</para>
        ///   <bulletList>
        ///     <bullet_item>Defense by feature class—Creates a shapefile based on the feature class name and removes trailing underscores from fields.</bullet_item><para/>
        ///     <bullet_item>Defense by subtype—Creates a shapefile based on subtype name, exports attributes applicable to that subtype, and removes trailing underscores from fields. This is the default.</bullet_item><para/>
        ///     <bullet_item>Generic by feature class—Creates a shapefile for each feature class selected. The shapefile name matches the feature class name.</bullet_item><para/>
        ///     <bullet_item>Generic by subtype—Creates a shapefile for each subtype of the feature class selected. The shapefile name matches the subtype name.</bullet_item><para/>
        ///     <bullet_item>MGCP—Creates a shapefile based on the feature class subtype. The shapefile is named using the geometry type and feature code. For example, the River subtype in the WatrcrsL feature class would be exported to a shapefile called LBH140.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示将应用哪种转换方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按要素类防御 - 基于要素类名称创建 shapefile，并从字段中移除尾随下划线。</bullet_item><para/>
        ///     <bullet_item>按子类型防御 - 根据子类型名称创建 shapefile，导出适用于该子类型的属性，并从字段中删除尾随下划线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>按要素类通用 - 为所选的每个要素类创建一个 shapefile。shapefile 名称与要素类名称匹配。</bullet_item><para/>
        ///     <bullet_item>按子类型通用 - 为所选要素类的每个子类型创建一个 shapefile。shapefile 名称与子类型名称匹配。</bullet_item><para/>
        ///     <bullet_item>MGCP - 基于要素类子类型创建 shapefile。shapefile 使用几何类型和特征代码进行命名。例如，WatrcrsL 要素类中的 River 子类型将导出到名为 LBH140 的 shapefile。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_create_empties">
        /// <para>Create Empty Shapefiles</para>
        /// <para><xdoc>
        ///   <para>Indicates that the tool will create empty shapefiles if the input feature classes are also empty.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Create empty shapefiles if the corresponding feature classes to export are empty.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not create empty shapefiles if the corresponding feature classes to export are empty. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示如果输入要素类也为空，则该工具将创建空 shapefile。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 如果要导出的相应要素类为空，则创建空 shapefile。</bullet_item><para/>
        ///     <bullet_item>未选中 - 如果要导出的相应要素类为空，则不创建空 shapefile。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        public GeodatabaseToShape(List<object> _in_features, object _output_folder, _coded_value_domain_export_mode_value _coded_value_domain_export_mode, _conversion_method_value _conversion_method, _create_empties_value _create_empties)
        {
            this._in_features = _in_features;
            this._output_folder = _output_folder;
            this._coded_value_domain_export_mode = _coded_value_domain_export_mode;
            this._conversion_method = _conversion_method;
            this._create_empties = _create_empties;
        }
        public override string ToolboxName => "Topographic Production Tools";

        public override string ToolName => "Geodatabase To Shape";

        public override string CallName => "topographic.GeodatabaseToShape";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _output_folder, _coded_value_domain_export_mode.GetGPValue(), _conversion_method.GetGPValue(), _create_empties.GetGPValue(), _derived_folder];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features used to create the shapefiles.</para>
        /// <para>用于创建 shapefile 的功能。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_features { get; set; }


        /// <summary>
        /// <para>Output Folder</para>
        /// <para>The folder that will contain the output shapefiles.</para>
        /// <para>将包含输出 shapefile 的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Folder")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_folder { get; set; }


        /// <summary>
        /// <para>Coded Value Domain Export Mode</para>
        /// <para><xdoc>
        ///   <para>Indicates what method will be used to export coded domain values.</para>
        ///   <bulletList>
        ///     <bullet_item>Descriptions—Coded domain values will be exported using their descriptions rather than raw values.</bullet_item><para/>
        ///     <bullet_item>Values—Coded domain values will be exported as raw values. This is the default.</bullet_item><para/>
        ///     <bullet_item>Values and descriptions—Coded domain values will be exported as raw values and string descriptions</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示将用于导出编码域值的方法。</para>
        ///   <bulletList>
        ///     <bullet_item>描述 - 编码属性域值将使用其描述（而不是原始值）导出。</bullet_item><para/>
        ///     <bullet_item>值—编码的属性域值将导出为原始值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>值和描述 - 编码的属性域值将导出为原始值和字符串描述</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Coded Value Domain Export Mode")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _coded_value_domain_export_mode_value _coded_value_domain_export_mode { get; set; }

        public enum _coded_value_domain_export_mode_value
        {
            /// <summary>
            /// <para>Values</para>
            /// <para>Values—Coded domain values will be exported as raw values. This is the default.</para>
            /// <para>值—编码的属性域值将导出为原始值。这是默认设置。</para>
            /// </summary>
            [Description("Values")]
            [GPEnumValue("VALUES")]
            _VALUES,

            /// <summary>
            /// <para>Descriptions</para>
            /// <para>Descriptions—Coded domain values will be exported using their descriptions rather than raw values.</para>
            /// <para>描述 - 编码属性域值将使用其描述（而不是原始值）导出。</para>
            /// </summary>
            [Description("Descriptions")]
            [GPEnumValue("DESCRIPTIONS")]
            _DESCRIPTIONS,

            /// <summary>
            /// <para>Values and descriptions</para>
            /// <para>Values and descriptions—Coded domain values will be exported as raw values and string descriptions</para>
            /// <para>值和描述 - 编码的属性域值将导出为原始值和字符串描述</para>
            /// </summary>
            [Description("Values and descriptions")]
            [GPEnumValue("VALUES_AND_DESCRIPTIONS")]
            _VALUES_AND_DESCRIPTIONS,

        }

        /// <summary>
        /// <para>Conversion Method</para>
        /// <para><xdoc>
        ///   <para>Indicates which conversion method will be applied.</para>
        ///   <bulletList>
        ///     <bullet_item>Defense by feature class—Creates a shapefile based on the feature class name and removes trailing underscores from fields.</bullet_item><para/>
        ///     <bullet_item>Defense by subtype—Creates a shapefile based on subtype name, exports attributes applicable to that subtype, and removes trailing underscores from fields. This is the default.</bullet_item><para/>
        ///     <bullet_item>Generic by feature class—Creates a shapefile for each feature class selected. The shapefile name matches the feature class name.</bullet_item><para/>
        ///     <bullet_item>Generic by subtype—Creates a shapefile for each subtype of the feature class selected. The shapefile name matches the subtype name.</bullet_item><para/>
        ///     <bullet_item>MGCP—Creates a shapefile based on the feature class subtype. The shapefile is named using the geometry type and feature code. For example, the River subtype in the WatrcrsL feature class would be exported to a shapefile called LBH140.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示将应用哪种转换方法。</para>
        ///   <bulletList>
        ///     <bullet_item>按要素类防御 - 基于要素类名称创建 shapefile，并从字段中移除尾随下划线。</bullet_item><para/>
        ///     <bullet_item>按子类型防御 - 根据子类型名称创建 shapefile，导出适用于该子类型的属性，并从字段中删除尾随下划线。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>按要素类通用 - 为所选的每个要素类创建一个 shapefile。shapefile 名称与要素类名称匹配。</bullet_item><para/>
        ///     <bullet_item>按子类型通用 - 为所选要素类的每个子类型创建一个 shapefile。shapefile 名称与子类型名称匹配。</bullet_item><para/>
        ///     <bullet_item>MGCP - 基于要素类子类型创建 shapefile。shapefile 使用几何类型和特征代码进行命名。例如，WatrcrsL 要素类中的 River 子类型将导出到名为 LBH140 的 shapefile。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Conversion Method")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _conversion_method_value _conversion_method { get; set; }

        public enum _conversion_method_value
        {
            /// <summary>
            /// <para>Defense by feature class</para>
            /// <para>Defense by feature class—Creates a shapefile based on the feature class name and removes trailing underscores from fields.</para>
            /// <para>按要素类防御 - 基于要素类名称创建 shapefile，并从字段中移除尾随下划线。</para>
            /// </summary>
            [Description("Defense by feature class")]
            [GPEnumValue("DEFENSE_BY_FEATURECLASS")]
            _DEFENSE_BY_FEATURECLASS,

            /// <summary>
            /// <para>Defense by subtype</para>
            /// <para>Defense by subtype—Creates a shapefile based on subtype name, exports attributes applicable to that subtype, and removes trailing underscores from fields. This is the default.</para>
            /// <para>按子类型防御 - 根据子类型名称创建 shapefile，导出适用于该子类型的属性，并从字段中删除尾随下划线。这是默认设置。</para>
            /// </summary>
            [Description("Defense by subtype")]
            [GPEnumValue("DEFENSE_BY_SUBTYPE")]
            _DEFENSE_BY_SUBTYPE,

            /// <summary>
            /// <para>Generic by feature class</para>
            /// <para>Generic by feature class—Creates a shapefile for each feature class selected. The shapefile name matches the feature class name.</para>
            /// <para>按要素类通用 - 为所选的每个要素类创建一个 shapefile。shapefile 名称与要素类名称匹配。</para>
            /// </summary>
            [Description("Generic by feature class")]
            [GPEnumValue("GENERIC_BY_FEATURECLASS")]
            _GENERIC_BY_FEATURECLASS,

            /// <summary>
            /// <para>Generic by subtype</para>
            /// <para>Generic by subtype—Creates a shapefile for each subtype of the feature class selected. The shapefile name matches the subtype name.</para>
            /// <para>按子类型通用 - 为所选要素类的每个子类型创建一个 shapefile。shapefile 名称与子类型名称匹配。</para>
            /// </summary>
            [Description("Generic by subtype")]
            [GPEnumValue("GENERIC_BY_SUBTYPE")]
            _GENERIC_BY_SUBTYPE,

            /// <summary>
            /// <para>MGCP</para>
            /// <para>MGCP—Creates a shapefile based on the feature class subtype. The shapefile is named using the geometry type and feature code. For example, the River subtype in the WatrcrsL feature class would be exported to a shapefile called LBH140.</para>
            /// <para>MGCP - 基于要素类子类型创建 shapefile。shapefile 使用几何类型和特征代码进行命名。例如，WatrcrsL 要素类中的 River 子类型将导出到名为 LBH140 的 shapefile。</para>
            /// </summary>
            [Description("MGCP")]
            [GPEnumValue("MGCP")]
            _MGCP,

        }

        /// <summary>
        /// <para>Create Empty Shapefiles</para>
        /// <para><xdoc>
        ///   <para>Indicates that the tool will create empty shapefiles if the input feature classes are also empty.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Create empty shapefiles if the corresponding feature classes to export are empty.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Do not create empty shapefiles if the corresponding feature classes to export are empty. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指示如果输入要素类也为空，则该工具将创建空 shapefile。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 如果要导出的相应要素类为空，则创建空 shapefile。</bullet_item><para/>
        ///     <bullet_item>未选中 - 如果要导出的相应要素类为空，则不创建空 shapefile。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create Empty Shapefiles")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _create_empties_value _create_empties { get; set; }

        public enum _create_empties_value
        {
            /// <summary>
            /// <para>NO_CREATE_EMPTIES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_CREATE_EMPTIES")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>CREATE_EMPTIES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CREATE_EMPTIES")]
            [GPEnumValue("true")]
            _true,

        }

        /// <summary>
        /// <para>Derived Folder</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Derived Folder")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_folder { get; set; }


        public GeodatabaseToShape SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}